R : Convert Categorical Variables To Numeric In R